import Button from '../packages/button'
import ButtonGroup from '../packages/button-group'
import Row from '../packages/row'

const components = [Button, ButtonGroup, Row]

const install = function (Vue, opts = {}) {
  components.forEach((component) => {
    Vue.component(component.name, component)
  })

  Vue.prototype.$ELEMENT = {
    size: opts.size || '',
    zIndex: opts.zIndex || 2000
  }
}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export default {
  version: '2.15.13',
  install,
  Button,
  ButtonGroup,
  Row
}
